package com.office.service.impl;

import com.office.bean.Student;
import com.office.bean.StudentInfo;
import com.office.mapper.StudentMapper;
import com.office.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    StudentMapper studentMapper;

    @Override
    public long findTotalCount(Map<String, Object> map) {
        return studentMapper.findTotalCount(map);
    }

    @Override
    public List<Student> findStudentsByPage(Map<String, Object> map) {
        return studentMapper.findStudentsByPage(map);
    }

    @Override
    public boolean deleteStudent(int id) {
        return studentMapper.deleteStudent(id);
    }

    @Override
    public Student findStudentById(int id) {
        return studentMapper.findStudentById(id);
    }

    @Override
    public int update(Student student) {
        return studentMapper.update(student);
    }

    @Override
    public List<Student> findExportStudents(Map<String, Object> map) {
        return studentMapper.findExportStudents(map);
    }

    @Override
    public int insertBatch(List<Student> students) {
        return studentMapper.insertBatch(students);
    }

    @Override
    public int insertStudent(Student student) {
        return studentMapper.insertStudent(student);
    }

    @Override
    public List<StudentInfo> findStudentInfo() {
        return studentMapper.findStudentInfo();
    }
}
